package org.example.client;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.example.MemberGroupResponsePacket;
import org.example.QuitGroupResponsePacket;

public class MemberGroupResponseHandler extends SimpleChannelInboundHandler<MemberGroupResponsePacket> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, MemberGroupResponsePacket memberGroupResponsePacket) {
        if (memberGroupResponsePacket.isSuccess()){
            System.out.println("群成员列表：" + memberGroupResponsePacket
                    .getUserIds());
        }else {
            System.out.println("获取群成员列表失败.");
        }
    }
}
